package com.cruise.game.common.constants;

/**
 * 安全常量
 *
 * @author cruise
 * @date 2025-02-28
 */
public interface SecurityConstants {

        /**
         * 认证请求头key
         */
        String AUTHORIZATION_HEADER = "Authorization";

        /**
         * JWT Token前缀
         */
        String TOKEN_PREFIX = "Bearer ";

        /**
         * Admin Secret Key
         */
        String ADMIN_SECRET_KEY = "cruise_admin_secret_key";

        /**
         * 角色前缀
         */
        String ROLE_CLAIMS = "role";
        /**
         * Role prefix
         */
        String ROLE_PREFIX = "ROLE_";

        /**
         * 普通用户角色
         */
        String ROLE_USER = "user";

        /**
         * 代理角色
         */
        String ROLE_AGENT = "agent";

        /**
         * 管理员角色
         */
        String ROLE_ADMIN = "admin";

        /**
         * 开放API URL
         */
        String[] OPEN_API_URLS = {
                        "/api/auth/**",
                        "/api/home/**",
                        "/api/game/categories",
                        "/v3/api-docs",
                        "/swagger-resources/**",
                        "/swagger-ui/**",
                        "/doc.html"
        };

        /**
         * 用户API URL
         */
        String[] USER_API_URLS = {
                        "/api/user/**",
                        "/api/orders/**",
                        "/api/chat/**"
        };

        /**
         * 代理API URL
         */
        String[] AGENT_API_URLS = {
                        "/api/agent/**"
        };

        /**
         * 管理员API URL
         */
        String[] ADMIN_API_URLS = {
                        "/api/admin/**"
        };
}
